/**
 * 
 */
package com.planner.core.service.rest.core;

import java.text.DecimalFormat;
import java.text.Format;

import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;

import com.sangharsh.core.algo.location.Location;

/**
 * @author gautasa
 *
 */
@XmlRootElement
@XmlAccessorType(XmlAccessType.PROPERTY)
public class RestLocation {

	private Location location;
	private Format formatter = new DecimalFormat("##.######");
	
	public RestLocation(){
		super();
	}
	/**
	 * 
	 */
	public RestLocation(Location location) {
		super();
		this.location = location;
	}
	@XmlElement
	public String getLatitude() {
		return formatter.format(location.getLatitude());
	}
	@XmlElement
	public String getLongitude() {
		return formatter.format(location.getLongitude());
	}
}
